home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / OS / ODUtils / Include / SemtIntf.xh < prev    next >
Encoding:
Text File  |  1995-11-08  |  4.2 KB  |  175 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: Diogenes:Ling:ODF:OS:ODUtils:Include:SemtIntf.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxh.dll: 2.33
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *  Classes defined in this interface
  13.  * 
  14.  */
  15.  
  16.  
  17. #ifndef SOM_ODCPlusSemanticInterface_xh
  18. #define SOM_ODCPlusSemanticInterface_xh
  19.  
  20. class ODCPlusSemanticInterface;
  21.  
  22. #define ODCPlusSemanticInterface_MajorVersion 0
  23. #define ODCPlusSemanticInterface_MinorVersion 0
  24.  
  25. /*
  26.  * Passthru lines: File: "C.xh", "before"
  27.  */
  28.  
  29.  
  30. class    SIHelperAbs;
  31.  
  32.  
  33. /* C++ SOM defs */
  34. #include <somcls.xh>
  35. #include <somcm.xh>
  36.  
  37. /* C++ parent defs */
  38. #ifndef SOM_ODSemanticInterface_xh
  39. #include <SemtIntB.xh>
  40. #endif
  41.  
  42. #ifndef ODCPlusSemanticInterface_API
  43. #define ODCPlusSemanticInterface_API
  44. /*
  45.  * -- The Class API
  46.  */
  47.  
  48. /*
  49.  * Start of user-defined types:
  50.  */
  51. class SOMClass;
  52. class SOMObject;
  53. class ODFrame;
  54. class ODFacet;
  55. class ODObject;
  56. class ODExtension;
  57. class ODRefCntObject;
  58. class ODSemanticInterface;
  59. class ODSession;
  60. class ODPart;
  61. class ODDesc;
  62. class ODAppleEvent;
  63. class ODOSLToken;
  64. class ODCPlusSemanticInterface;
  65.  
  66. /*
  67.  * End of user-defined types.
  68.  */
  69.  
  70. #ifdef OLDIBMSOMAPISUPPORT
  71. #define ODCPlusSemanticInterfaceCClassData ODCPlusSemanticInterfaceClassData
  72. #define ODCPlusSemanticInterfaceNewClass(major,minor) somNewVersionedClassReference(ODCPlusSemanticInterface,major,minor)
  73. #endif
  74.  
  75. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  76. #define ODCPlusSemanticInterfaceMetaClass SOMClass
  77.  
  78.  
  79. /* The API to the ODCPlusSemanticInterface class object, and the methods it introduces. */
  80. SOMEXTERN struct ODCPlusSemanticInterfaceClassDataStructure {
  81. #ifdef OLDIBMSOMAPISUPPORT
  82.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  83. #else
  84.     long zero;
  85. #endif
  86.     somStaticClassInfo *sci;
  87.     somDToken        instanceDataToken;
  88.     long reserved [3];
  89.     somMToken InitCPlusSemanticInterface;
  90.     somMToken GetSIHelper;
  91. } SOMDLINK ODCPlusSemanticInterfaceClassData;
  92.  
  93. #if !defined(ODCPlusSemanticInterface_Class_Source) && !defined(SOM_Module_semtintf_Source)
  94. #if PRAGMA_IMPORT_SUPPORTED
  95. #pragma import list ODCPlusSemanticInterfaceClassData
  96. #endif
  97. #endif
  98.  
  99.  
  100. /*
  101.  * -- Typedefs and inline method declarations for left path inherited methods
  102.  * -- are omitted because this compilation had -museinheritedmethods in effect
  103.  */
  104.  
  105.  
  106. /*
  107.  * -- Typedefs for ODCPlusSemanticInterface Method Procedures
  108.  */
  109. SOMEXTERN {
  110. typedef void   (* SOMLINK somTD_ODCPlusSemanticInterface_InitCPlusSemanticInterface)(ODCPlusSemanticInterface *somSelf, Environment *ev,
  111.         ODPart* base,
  112.         SIHelperAbs* helper,
  113.         ODSession* session);
  114. typedef SIHelperAbs*   (* SOMLINK somTD_ODCPlusSemanticInterface_GetSIHelper)(ODCPlusSemanticInterface *somSelf, Environment *ev);
  115. }
  116.  
  117. #endif /* ODCPlusSemanticInterface_API */
  118.  
  119.  
  120. /*
  121.  * -- This emitter treats Method Tokens as Thunks by default.
  122.  * -- Use the sc modifier "nothunks" to change this default
  123.  */
  124. #undef somresolve_
  125. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  126.  
  127. /*
  128.  * -- The C++ Wrapper Class for ODCPlusSemanticInterface
  129.  */
  130. class ODCPlusSemanticInterface : public ODSemanticInterface
  131. {
  132. public:
  133.  
  134. // ODCPlusSemanticInterface::new registers use of the class object, and then uses somNew
  135. // to allocate memory and load the object method table pointer. 
  136. void *operator new(size_t size)
  137. {
  138.     SOM_IgnoreWarning(size);
  139.     // Allocate memory using the default allocator for ODCPlusSemanticInterface, and
  140.     // clear mem & set method table pointer, call basic initialization
  141.     return (void*) somNewObject(ODCPlusSemanticInterface);
  142. }
  143.  
  144. // ODCPlusSemanticInterface::delete uses the default deallocator for the object's class.
  145. void operator delete(void * obj)
  146. {
  147.     if (obj) {
  148.         SOM_Resolve(obj,SOMObject,somFree)
  149.            ( (SOMObject*) obj );
  150.     }
  151. }
  152.  
  153. /* method: InitCPlusSemanticInterface */
  154. void   InitCPlusSemanticInterface(Environment *ev,
  155.         ODPart* base,
  156.         SIHelperAbs* helper,
  157.         ODSession* session)
  158. {
  159.    SOM_ResolveD(this,ODCPlusSemanticInterface,ODCPlusSemanticInterface,InitCPlusSemanticInterface)
  160.     (this,ev,base,helper,session);
  161. }
  162.  
  163. /* method: GetSIHelper */
  164. SIHelperAbs*   GetSIHelper(Environment *ev)
  165. {
  166.    return SOM_ResolveD(this,ODCPlusSemanticInterface,ODCPlusSemanticInterface,GetSIHelper)
  167.     (this,ev);
  168. }
  169.  
  170. };   /* ODCPlusSemanticInterface */
  171.  
  172.  
  173.  
  174. #endif       /* SOM_ODCPlusSemanticInterface_xh */
  175.